public class MethodExercise02 {
	public static void main(String[] args) {
		Person p1 = new Person();
		p1.name = "jack";
		p1.age = 10;

		MyTools m1 = new MyTools();
		Person p2 = m1.copyPerson(p1);
		System.out.println(p2.name + " " + p2.age);
		System.out.println(p1 == p2);
	}
}

class Person {
	String name;
	int age;
}

class MyTools {
	public Person copyPerson(Person p) {
		Person newPerson = new Person();
		newPerson.age = p.age;
		newPerson.name = p.name;

		return newPerson;
	}
}